package com.yangc.stream.rabbit.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.function.Consumer;

@Configuration
public class LoggingConsumer {

    @Bean
    public Consumer<String> log() {
        return message -> {
            System.out.println("Received: " + message);
        };
    }
}
